from typing import Annotated, Dict, Any
from typing_extensions import TypedDict
from langgraph.graph import MessagesState

class GraphState(MessagesState):
    """
    GraphRAG的状态定义
    """
    # 处理类型
    processing_type: str
    
    # 检索到的上下文
    context: str
    
    # 查询结果
    query_result: str
    
    # 用户ID
    user_id: str
    
    # 会话ID
    conversation_id: str
    
    # 错误信息
    error: str
    
    # 意图数据
    intent_data: Dict[str, Any]
    
    # 生成的响应
    response: str